const rateOptions = [
  { label: 1, name: '1.0X' },
  { label: 2, name: '2.0X' },
  { label: 4, name: '4.0X' },
  { label: 8, name: '8.0X' },
  { label: 16, name: '16.0X' }
];

export default {
  data() {
    return {
      rateOptions,
      playbackRate: 1 // 默认1倍数播放视频
    };
  },
  methods: {
    playRateChange(val) {
      const videos = document.querySelectorAll('.video-player-change-rate');
      [...videos].forEach(item => {
        item.play();
        item.playbackRate = val;
      });
    }
  }
};
